#ifndef UNIFONT_H_
#define UNIFONT_H_

#include <nds.h>
#include <cstdio>
#include <vector>

#include "graphics_font.h"

class Unifont
{
	public:
		Unifont();
		void read(std::vector<glyph>* glyphTable);
		
	private:
		FILE* fontFile;
		char glyphBuffer[1024];
		u16  glyphBufferNow;
		u16  glyphBufferMax;
		struct {
			u32 codepoint;
			u32 byte;
		} seekPoint[256];
		std::string readFontLine(bool first, long int pos=0);	
};

#endif /* UNIFONT_H_ */
